home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 07511000 / var0888.dms / var0888.adf / WoManD / man / C_Library / atof < prev    next >
Text File  |  1992-09-19  |  1KB  |  32 lines

  1. ATOF(1)                     C LIBRARY FUNCTIONS                      ATOF(1)
  2.  
  3. NAME
  4.      atof, strtod - convert string to double-precision number.
  5.  
  6. SYNOPSIS
  7.      double strtod(const char *str, char **end_ptr);
  8.  
  9.      double atof(char *str);
  10.  
  11. INCLUDE FILE
  12.      stdlib.h
  13.  
  14. DESCRIPTION
  15.      strtod() returns as a double-precision floating-point number the value
  16.            represented by the character string pointed to by str. The string
  17.            is scanned up to the first unrecognized character.
  18.  
  19.            If the value of end_ptr is not (char **)NULL, a pointer to the
  20.            character terminating the scan is returned in the location pointed
  21.            to by end_ptr. If no number can be formed, *end_ptr is set to str,
  22.            0.0 is returned. On overflow, zero is returned and ERANGE is
  23.            stored in errno.
  24.  
  25.      atof(str) is equivalent to strtod(str, (char **)NULL). Thus, when
  26.            atof(str) returns 0.0 there is no way to determine whether str
  27.            contained a valid numerical string representing 0.0 or an invalid
  28.            numerical string.
  29.  
  30. SEE ALSO
  31.      scanf(), atoi().
  32.